package geowiki;

import geowiki.data.Place;
import geowiki.vis.PlaceMarker;

import java.util.List;

public class SpiderPolygonApp extends GeoWikiApp {

	public void setup() {
		super.setup();
		noLoop();
		
		List<Place> places = loadPlacesViaPlacemakerFromWiki("Walter_Gropius");
		placeMarkers = createPlaceMarkers(places);
	}
	
	public void draw() {
		beginRecord(PDF, "spider.pdf");
		
		image(worldMap, 0, 0, width, height);
		
		beginShape();
		
		for (int i = 0; i < placeMarkers.size(); i++) {
			PlaceMarker pm = (PlaceMarker) placeMarkers.get(i);
			pm.display();
			
			vertex(pm.getX(), pm.getY());
		}
		
		fill(220, 200);
		endShape();
		
		
		endRecord();
		println("PDF created. Exiting program.");
		exit();
	}

}
